% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_datapack.R
\name{datapack}
\alias{datapack}
\title{UTILITY - DRAFT - See names and size of data sets in installed package(s) - internal utility function}
\usage{
datapack(pkg = ejampackages, len = 30, sortbysize = TRUE, simple = TRUE)
}
\arguments{
\item{pkg}{a character vector giving the package(s) to look in for data sets}

\item{len}{Only affects what is printed to console - specifies the
number of characters to limit Title to, making it easier to see in the console.}

\item{sortbysize}{if TRUE (and simple=F),
sort by increasing size of object, within each package, not alpha.}

\item{simple}{FALSE to get object sizes, etc., or
TRUE to just get names in each package, like
\code{data(package = "EJAM")$results[, c("Package", 'Item')]}}
}
\value{
If simple = TRUE, data.frame with colnames Package and Item.
}
\description{
Wrapper for data() and can get memory size of objects
}
\details{
do not rely on this much - it was a quick utility.
It may create and leave objects in global envt - not careful about that.
}
\examples{
 # see just a vector of the data object names
 data(package = "EJAM")$results[, 'Item']
 
 # not actually sorted within each pkg by default
 datapack()
 # not actually sorted by default
 datapack("EJAM")$Item
 ##datapack("MASS", simple=T)
 
 # sorted by size if simple=F
 ##datapack("datasets", simple=F)
 x <- datapack(simple = F)
 # sorted by size already, to see largest ones among all these pkgs:
 tail(x[, 1:3], 20)
 
 # sorted alphabetically within each pkg
 x[order(x$Package, x$Item), 1:2]
 # sorted alphabetically across all the pkgs
 x[order(x$Item), 1:2]

}
\seealso{
\code{\link[=dataset_pkgdown_yaml_check]{dataset_pkgdown_yaml_check()}}
If simple = FALSE, data.frame with colnames Package, Item, size, Title.Short
}
\keyword{internal}
